package com.mc.read.adminapi.controller;

import com.mc.read.adminapi.service.LabelService;
import com.mc.read.vo.request.BaseRequest;
import com.mc.read.vo.respose.BaseRespose;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author liuhao
 * @date 2019/6/14 17:18
 */
@Controller
@RequestMapping(value = "/verify/label")
@Slf4j
public class LabelController {
    @Autowired
    LabelService labelService;

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 查询标签审核列表 selectLabelAuditList
     **/
    @ResponseBody
    @RequestMapping(value = "selectLabelAuditList", method = RequestMethod.POST)
    public BaseRespose selectLabelAuditList(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = labelService.selectLabelAuditList(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 标签审核 不通过 labelAuditNoPass
     **/
    @ResponseBody
    @RequestMapping(value = "labelAuditNoPass", method = RequestMethod.POST)
    public BaseRespose labelAuditNoPass(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = labelService.labelAuditNoPass(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 标签审核 通过 labelAuditPass
     **/
    @ResponseBody
    @RequestMapping(value = "labelAuditPass", method = RequestMethod.POST)
    public BaseRespose labelAuditPass(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = labelService.labelAuditPass(baseRequest);
        return baseRespose;
    }

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 删除标签审核记录 deleteLabelAudit
     **/
    @ResponseBody
    @RequestMapping(value = "deleteLabelAudit", method = RequestMethod.POST)
    public BaseRespose deleteLabelAudit(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = labelService.deleteLabelAudit(baseRequest);
        return baseRespose;
    }


}
